<template>
  <div ref="editorElRef"></div>
</template>

<script setup lang="ts">
import {onMounted} from "vue";
import ClassicEditor from './editor'

const editorElRef = shallowRef<HTMLElement>()
const editor = shallowRef<ClassicEditor>(null as unknown as ClassicEditor)

onMounted(async () => {
  try {
    editor.value = await ClassicEditor.create(editorElRef.value!)
    console.log('Editor was initialized', editor.value);
  } catch (err) {
    console.error(err);
  }
})
</script>

<style scoped>

</style>
